#include "dish.h"
#include <string>

Dish::Dish()
    : name(""), sales(0), import_price(0), sold_price(0)
{
}

Dish::Dish(const std::string &name, int sales, float import_price, float sold_price)
    : name(name), sales(sales), import_price(import_price), sold_price(sold_price)
{
}

void Dish::setName(const std::string &name)
{
    this->name = name;
}
void Dish::setSales(int sales)
{
    this->sales = sales;
}
void Dish::setImportPrice(float import_price)
{
    this->import_price = import_price;
}
void Dish::setSoldPrice(float sold_price)
{
    this->sold_price = sold_price;
}
std::string Dish::getName()
{
    return name;
}
int Dish::getSales()
{
    return sales;
}

float Dish::getImportPrice()
{
    return import_price;
}

float Dish::getSoldPrice()
{
    return sold_price;
}

float Dish::business()
{
    return sales * profit();
}

float Dish::profit()
{
    return sold_price - import_price;
}
